<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------
use email\PHPMailer;

    // 应用公共文件
    //短信验证接口常量
    define('ACCOUNTSID', '8aaf0708639129c40163a721a44016e2');
    define('ACCOUNTTOKEN', 'de23fb7c91a740f9a0955b5adf18d89d');
    define('APPID', '8aaf0708639129c40163a721a49316e8');
    define('SERVERIP', 'app.cloopen.com');
    define('SERVERPORT', '8883');
    define('SOFTVERSION', '2013-12-26');

// qq登录
function https_request($url)
{
    // 初始化
    $ch = curl_init();
    // 设置
    curl_setopt($ch,CURLOPT_URL,$url);
    // 检查ssl证书
    curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
    // 从检查本地证书检查是否ssl加密
    curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,$url);

    // 判断$data 判断是否post
    if ( !empty($data) ) {
        curl_setopt($ch,CURLOPT_POST,1);// 开启post
        curl_setopt($ch,CURLOPT_POSTFIELDS,$data);// 发送post $data

    }
    // 返回结果 是文件流的方式返回
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    $res = curl_exec($ch);
    curl_close($ch); // close curl res
    return $res;
}